<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>测试支付</title>
</head>
<body>
扫码支付；
<div id="qrcode" > </div>
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<script src="/static/js/qrcode.js"></script>
<script>
    $.ajax({
        url:'/api/qrcode?page=1',
        success:function (res) {
            console.log(res);
            var rows = res.data.rows;
            var item = rows[rows.length-1];
            console.log(item);
			var qrcode = new QRCode("qrcode", {
				text: item.qr_url,
				width: 128,
				height: 128,
				colorDark : "#000000",
				colorLight : "#ffffff",
				correctLevel : QRCode.CorrectLevel.H
			});
        },
		fail:function () {
			alert('你还未登录');
		},
		error:function () {
			alert('你还未登录');
		}
    })
</script>
</body>
</html>
